{extend name="base" /} {block name="body"}
<div class="layui-body">
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<ul class="layui-tab-title">
			<li class="layui-this">管理员</li>
			<li class="">
				<a href="{:url('admin/user/add')}">添加管理员</a>
			</li>
		</ul>
		<div class="layui-tab-content">
			<div class="layui-tab-item layui-show">
				<table class="layui-table">
					<thead>
						<tr>
							<th style="width: 30px;">ID</th>
							<th>用户名</th>
							<th>昵称</th>
							<th>状态</th>
							<th>创建时间</th>
							<th>最后登录时间</th>
							<th>最后登录IP</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						{foreach name="user_list" item="vo"}
						<tr>
							<td>{$vo.id}</td>
							<td>{$vo.login_name}</td>
							<td>{$vo.nick_name}</td>
							<td>
								{if condition="$vo['status'] eq 1"}<font color="green">启用</font>{else}<font color="red">禁用</font>{/if}
							</td>
							<td>{$vo.add_time}</td>
							<td>{$vo.last_login_time}</td>
							<td>{$vo.last_login_ip}</td>
							<td>
								<a href="{:url('admin/user/update',['id'=>$vo['id']])}" class="layui-btn layui-btn-normal layui-btn-small">编辑</a>
								<a href="{:url('admin/user/delete',['id'=>$vo['id']])}" class="layui-btn layui-btn-danger layui-btn-small ajax-delete">删除</a>
							</td>
						</tr>
						{/foreach}
					</tbody>
				</table>
				{$user_list->render()}
			</div>
		</div>
	</div>
</div>
{/block}